<div>
    <h1 mat-dialog-title style="display:inline-block;cursor:move;" mat-dialog-draggable>更换设备</h1>
    <mat-icon (click)="onNoClick()" class="dialog-close-btn" cdkFocusInitial>clear</mat-icon>
    <div mat-dialog-content>
        
        <!-- <div class="my-form-field" style="display: block;margin-bottom: 10px;">
            <span>设备类型</span>
            <input disabled [(ngModel)]="form.entityTypeName" type="text" style="width:300px">
        </div> -->
        <div class="my-form-field" style="display: block;margin-bottom: 10px;">
            <span>产品</span>
            <input disabled [(ngModel)]="form.productName" type="text" style="width:300px">
        </div>
        <!-- <div class="my-form-field" style="display: block;margin-bottom: 10px;">
            <span>产品</span>
            <select  style="width:100%" matNativeControl [(ngModel)]="form.productId" >
                <option *ngFor="let product of productList" [value]="product.id">
                  {{product.name}}
                </option>
            </select>
        </div> -->
        <div class="my-form-field" style="display: block;margin-bottom: 10px;">
            <span>设备</span>
            <select (change)="onDeviceIdChange(form.deviceId)" [disabled]="deviceInstanceList.length===0" style="width:100%" matNativeControl [(ngModel)]="form.id" >
                <option *ngFor="let device of deviceInstanceList" [value]="device.id">
                  {{device.name}}
                </option>
              </select>
        </div>
        <!-- <div style="display: grid; margin-bottom: 20px;">
      <input [(ngModel)]="data.name" type="text" width="100%" [readonly]="data.readonly">
    </div> -->
    </div>
    <div mat-dialog-actions class="dialog-action">
        <!-- (click)="onNoClick()" -->
        <button mat-raised-button mat-dialog-close >{{'dlg.cancel' | translate}}</button>
        <button mat-raised-button [disabled]="!isValid(data.name)" color="primary" [mat-dialog-close]="form" cdkFocusInitial>{{'dlg.ok' | translate}}</button>
    </div>
</div>
